<template>
  <div class="ShowSchool">
      <h2>学习名称:{{name}}</h2>
      <h2>学习地址:{{address}}</h2>
      <button @click="showSchool">展示更多信息</button>
  </div>
</template>

<script>
export default {
    name:'School',
    data(){
        return{
            name:'尚硅谷',
            address:'宏福科技园',
            city:'北京',
            tel:'1777323333'
        }
    },
    methods:{
        showSchool(){
            alert(`城市:${this.city},联系电话:${this.tel}`)
        }
    },
    
}
</script>

<style>
.ShowSchool{
    background-color:pink;
    padding: 20px;
}
</style>